package com.indusfo.spc.pda.controller;

import com.indusfo.spc.pda.pojo.OrderDosing;
import com.indusfo.spc.pda.service.OrderDosingService;
import com.indusfo.spc.pojo.Order;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ClassName OrderDosingController
 * @Description 任务单叫料controller
 * @Author louk
 * @Date 2019/12/24 21:26
 */
@Controller
@RequestMapping("/pda/orderDosing")
public class OrderDosingController {

    @Resource
    OrderDosingService orderDosingService;
    /**
     * 根据产线id,发布时间去查询对应的生产任务单和物料和批次数量
     * @param order
     * @return
     */
    @RequestMapping("queryOrderAndMat")
    @ResponseBody
    public JSONObject queryOrderAndMat(Order order){
        return  orderDosingService.queryOrderAndMat(order);
    }

    /**
     * 查询对应的任务单叫料记录
     * @param orderDosing
     * @return
     */
    @RequestMapping("queryOrderDosing")
    @ResponseBody
    public JSONObject queryOrderDosing(OrderDosing orderDosing){
        return  orderDosingService.queryOrderDosing(orderDosing);
    }


}
